home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 19
/
CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso
/
CUCD
/
Programming
/
LEDA
/
prog
/
graph
/
comp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-05
|
675b
|
42 lines
#include <LEDA/graph.h>
#include <LEDA/ugraph.h>
#include <LEDA/graph_alg.h>
main(int argc, char** argv)
{
GRAPH<int,int> G;
cmdline_graph(G,argc,argv);
ugraph G2(G);
node_array<int> compnum(G2);
node_array<int> compnum1(G2);
float T = used_time();
cout << "COMPONENTS ";
cout.flush();
COMPONENTS(G2,compnum);
cout << string(" %6.2f sec \n",used_time(T));
newline;
cout << "COMPONENTS 1 ";
cout.flush();
COMPONENTS1(G2,compnum1);
cout << string(" %6.2f sec \n",used_time(T));
if (Yes("ausgabe?"))
{ node v;
forall_nodes(v,G2)
{ G2.print_node(v);
cout << string(" c = %3d c1 = %3d \n", compnum[v],compnum1[v]);
}
}
newline;
return 0;
}